<?php

/**
 * Find out if layout is enabled.
 *
 * @author    Mon Zafra <monzee at gmail>
 * @copyright (c)2009 Mon Zafra
 * @license   http://mz-project.googlecode.com/svn/trunk/LICENSE    MIT License
 * @version   SVN: $Id: HasLayout.php 22 2009-05-08 17:08:41Z monzee $
 */
class Crud_View_Helper_HasLayout extends Zend_View_Helper_Abstract
{
    /**
     * @return bool
     */
    public function hasLayout()
    {
        $view = $this->view;
        return $view->layout()->getMvcInstance() && $view->layout()->isEnabled();
    }

}
